<template>
  <div class="home">
    {{ msg }}
  </div>
  <div>
    <el-button type="primary" @click="alert(1)"> 按钮 </el-button>
    <el-tag type="success">123</el-tag>
    <el-icon>
      <i-ep-edit />
    </el-icon>
    <div @click="goTo">登录页面</div>
  </div>
</template>
<script setup>
import { logout } from '@renderer/api/login'
const router = useRouter()

const data = reactive({
  msg: 'hello world'
})
const { msg } = toRefs(data)
const alert = (e) => {
  console.log(e)
  logout().then((res) => {
    console.log(res)
  })
}
const goTo = () => {
  router.push('/login')
}
</script>
<style lang="scss" scoped>
.home {
  color: $color;
}
</style>
